/*********************************
 * PROPRIETARY/CONFIDENTIAL.  Use of this product is subject to license terms.
 * Copyright (c) 2012 NVision Group, Inc. All rights reserved.
 *
 * AbstractAsyncCallback.java 25.06.2012 16:07:00
 *********************************/
package ru.kruzhki.client.rpc;

import java.util.logging.Logger;

import ru.kruzhki.client.gwt.NvgMessageBox;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * @author AKovalyov
 *
 */
public abstract class AbstractCallback<T> implements AsyncCallback<T> {

    private final Logger log = Logger.getLogger(this.getClass().getName());

    @Override
    public void onFailure(Throwable caught) {
        caught.printStackTrace();//XXX надо научить JUL печатать стектрейс
        log.severe(caught.toString());
        NvgMessageBox.warn(caught.getLocalizedMessage());
    }
    
}
